import request from '@/utils/request'

export function getUnits(params) {
  return request({
    url: '/basicdata/unit/',
    method: 'get',
    params
  })
}

export function createUnit(data) {
  return request({
    url: '/basicdata/unit/',
    method: 'post',
    data
  })
}

export function updateUnit(id, data) {
  return request({
    url: '/basicdata/unit/' + id + '/',
    method: 'put',
    data
  })
}

export function deleteUnit(id) {
  return request({
    url: '/basicdata/unit/' + id + '/',
    method: 'delete'
  })
}

